import React, {Component} from 'react';
import {Layout, Menu} from 'antd';
import Lng from '../common/lng';
import {Link} from "react-router-dom";
import RouterUtil from '../router/RouterUtil';

const {Header} = Layout;

class ApsHeader extends Component {

    render() {
        const {device, dish, dishType, dishSpec, dishProcess, dishSeq, priority} = RouterUtil.config;
        return <Header>
            <div className="logo"/>
            <Menu
                theme="dark"
                mode="horizontal"
                defaultSelectedKeys={['2']}
                style={{lineHeight: '64px'}}
            >
                <Menu.Item key="device">
                    <Link to={device}>{Lng.get("header.device")}</Link>
                </Menu.Item>
                <Menu.Item key="dish">
                    <Link to={dish}>{Lng.get("header.dish")}</Link>
                </Menu.Item>
                <Menu.Item key="dish-type">
                    <Link to={dishType}>{Lng.get("header.dishTypeInterval")}</Link>
                </Menu.Item>
                <Menu.Item key="dish-spec">
                    <Link to={dishSpec}>{Lng.get("header.dishSpec")}</Link>
                </Menu.Item>
                <Menu.Item key="dish-process">
                    <Link to={dishProcess}>{Lng.get("header.dishProcess")}</Link>
                </Menu.Item>
                <Menu.Item key="dish-seq">
                    <Link to={dishSeq}>{Lng.get("header.dishSeq")}</Link>
                </Menu.Item>
                <Menu.Item key="rules">
                    <Link to={priority}>{Lng.get("header.rules")}</Link>
                </Menu.Item>
            </Menu>
        </Header>;
    }
}

export default ApsHeader;